import sys, os
from register import register
from timestamp import Timestamp

def treewalk(root):
    epoch = Timestamp.utcepoch()
    for root, dirs, files in os.walk(root, topdown=True, followlinks=True):
        print "entering ==> ", os.path.relpath(root)
        print "dirs : ", dirs
        for f in files:
            register(os.path.join(root, f), epoch, 'A')

if __name__ == '__main__':
    for i in range(1, len(sys.argv)):
        treewalk(sys.argv[i])
